# -*- encoding=utf8 -*-
__author__ = "Admin"

from airtest.core.api import *
from airtest.cli.parser import cli_setup

if not cli_setup():
    auto_setup(__file__, logdir=True, devices=["android://127.0.0.1:5037/emulator-5554?",])


# script content
print("start...")



touch(Template(r"tpl1761739191862.png", record_pos=(0.25, -0.311), resolution=(900, 1600)))
touch(Template(r"tpl1761739195107.png", record_pos=(-0.092, 0.0), resolution=(900, 1600)))
text("复古")
touch(Template(r"tpl1761739233432.png", record_pos=(0.217, 0.154), resolution=(900, 1600)))
sleep(2.0)

touch(Template(r"tpl1761739304289.png", record_pos=(0.366, -0.313), resolution=(900, 1600)))
touch(Template(r"tpl1761739307772.png", record_pos=(0.418, -0.499), resolution=(900, 1600)))
text("流行")
sleep(1.0)
touch(Template(r"tpl1761739320152.png", record_pos=(0.211, 0.154), resolution=(900, 1600)))
touch(Template(r"tpl1761739501431.png", record_pos=(-0.427, -0.789), resolution=(900, 1600)))

from airtest.report.report import simple_report
# 设置自定义报告目录
custom_log_dir = r"E:\Work\codings\python\2506project\airtest\reports"

# 确保目录存在
if not os.path.exists(custom_log_dir):
    os.makedirs(custom_log_dir)
# generate html reports
simple_report(__file__, logpath=True, output=os.path.join(custom_log_dir, "liushengui.html"))







